﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Collections;
using NHibernate;

namespace DASwindles
{
    public static class DataFactory
    {
        #region CustomerData
        public static IList getCustomerDetails()
        {
            IDataManager customerData = new CustomerData();
            return customerData.getDetails();
        }

        public static object getCustomer_ByID(int pCustomerID)
        {
            IDataManager customerData = new CustomerData();
            return customerData.getDetails_ByID(pCustomerID);
        }

        public static void updateCustomer(object p_Customer)
        {
            IDataManager customerData = new CustomerData();
            customerData.updateDetails(p_Customer);
        }

        public static int insertCustomer(object p_Customer)
        {
            IDataManager customerData = new CustomerData();
            return customerData.insertDetails(p_Customer);
        }

        #endregion

        #region LoginData

        public static IList getLoginDetails()
        {
            IDataManager loginData = new LoginData();
            return loginData.getDetails();
        }

        public static object getLogin_ByID(int pLoginID)
        {
            IDataManager loginData = new LoginData();
            return loginData.getDetails_ByID(pLoginID);
        }

        public static void updateLogin(object p_Login)
        {
            IDataManager loginData = new LoginData();
            loginData.updateDetails(p_Login);
        }

        public static int insertLogin(object p_Login)
        {
            IDataManager loginData = new LoginData();
            return loginData.insertDetails(p_Login);
        }

        #endregion

        #region LoanData

        public static IList getLoanDetails()
        {
            IDataManager loanData = new LoanData();
            return loanData.getDetails();
        }

        public static object getLoan_ByID(int pLoanID)
        {
            IDataManager loanData = new LoanData();
            return loanData.getDetails_ByID(pLoanID);
        }

        public static void updateLoan(object p_Loan)
        {
            IDataManager loanData = new LoanData();
            loanData.updateDetails(p_Loan);
        }

        public static int insertLoan(object p_Loan)
        {
            IDataManager loanData = new LoanData();
            return loanData.insertDetails(p_Loan);
        }

        #endregion
    }
}
